from google.appengine.ext import db


class User(db.Model):
    client_id = db.StringProperty()
  
    def get_other_users(self):
        return User.all().filter('client_id !=', self.client_id)
  
    def is_caller(self):
        return self.get_other_users().count(limit=1) == 1
  
  
class Message(db.Model):
    client_id = db.StringProperty()
    data = db.TextProperty()
  
  
  
  